import request from '@/utils/request'
export default {
    //根据课程id查询章节、小节信息
    getChapterVideoById(courseId){
        return request({
            url:`/eduservice/educhapter/getChapterVideoById/${courseId}`,
            method:'get'
        })
    },
    //添加章节
    addChapter(educhapter){
        return request({
            url:`/eduservice/educhapter/addChapter`,
            method:'post',
            data:educhapter
        })
    },
    //删除章节
    delChapter(id){
        return request({
            url:`/eduservice/educhapter/delChapter/${id}`,
            method:'delete',
        })
    },
    //根据id查询章节
    getChapterById(id){
        return request({
            url:`/eduservice/educhapter/getChapterById/${id}`,
            method:'get',
        })
    },
    //修改章节
    updateChapter(educhapter){
        return request({
            url:`/eduservice/educhapter/updateChapter`,
            method:'post',
            data:educhapter
        })
    },
    //添加小节信息
    addVideo(eduVideo){
        return request({
            url:'/eduservice/eduvideo/addVideo',
            method:'post',
            data:eduVideo
        })
    },
    //修改小节信息
    updateVideo(eduVideo){
        return request({
            url:`/eduservice/eduvideo/updateVideo`,
            method:'post',
            data:eduVideo
        })
    },
    //通过id查询小节信息
    getVideoById(id){
        return request({
            url:`/eduservice/eduvideo/getVideoById/${id}`,
            method:'get'
        })
    },
    //通过id删除小节
    delVideo(id){
        return request({
            url:`/eduservice/eduvideo/delVideo/${id}`,
            method:'delete'
        })
    }
}